#ifndef WRITETHREAD_H
#define WRITETHREAD_H

#include <QThread>
#include <QWidget>
#include <QEvent>
#include <QMutex>

#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <termios.h>
#include <errno.h>

class WriteThread : public QThread
{
    Q_OBJECT
    public:
	WriteThread(int serial_FD,QByteArray byteArray);
	~WriteThread();
        int sendFinishFlag;
	
	void SendData();
    protected:
	virtual void run();
    private:
	int m_serial;
	QByteArray m_dataArray;
	fd_set m_writeSet;

};
#endif
